<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8">
        <title>HTML文件模板测试</title>
        <link rel="stylesheet" type="text/css" href="./tpl.css">
    </head>
    <body>
        <div class="tpl" id="tpl">
            <div class="tpl-list">
                <div class="list-panel">
                    <div class="ul-main">
                        <h3>标题1</h3>
                        <div class="ul-sub">
                            <div class="li">1</div>
                            <div class="li">2</div>
                            <div class="li">3</div>
                        </div>
                    </div>
                    <div class="ul-main">
                        <h3>标题2</h3>
                        <div class="ul-sub">
                            <div class="li">1</div>
                            <div class="li">2</div>
                            <div class="li">3</div>
                        </div>
                    </div>
                    <div class="ul-main">
                        <h3>标题3</h3>
                        <div class="ul-sub">
                            <div class="li">1</div>
                            <div class="li">2</div>
                            <div class="li">3</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="tpl-tab">
                <div class="tab-panel">
                    <h3>1</h3>
                    <h3>2</h3>
                    <h3 style="border-right:0;">3</h3>
                    <div class="clearfix"></div>
                    <div class="tab-main">
                        <div class="tab-content">111</div>
                        <div class="tab-content">222</div>
                        <div class="tab-content">333</div>
                    </div>
                </div>
            </div>
        </div>
        <script>
            document.addEventListener('DOMContentLoaded',function(){
                var tpl = document.getElementById('tpl').children;
                Array.prototype.slice.call(tpl).forEach(function(v,i){
                    window.localStorage.setItem(v.className,v.innerHTML);
                });
            });
            
        </script>
    </body>
</html>